#include <QPlastiqueStyle>
#include <QPalette>

class QPainterPath;

class KHelperStyle : public QPlastiqueStyle
{
	Q_OBJECT
public:
	KHelperStyle();
	~KHelperStyle();

	void polish(QPalette &palette);
	void polish(QWidget *widget);
	void unpolish(QWidget *widget);
	int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const;
	int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const;
	void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const;
	void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const;

	void setTexture(QPalette &palette, QPalette::ColorRole role, const QPixmap &pixmap);
private:
	static QPainterPath roundRectPath(const QRect &rect);

};
